package com.atstudy.abs;

/**
 * @version v1.0
 * @description:
 * @author: admin
 * @date: 2022/12/16 10:22
 * @copyright: 博为峰
 */
public class Rectangle extends Shape {
    public double length;
    public double width;

    public Rectangle() {
    }

    public Rectangle(double length, double width) {
        this.length = length;
        this.width = width;
    }

    public double area() {
        return length * width;
    }

    @Override
    public double perimeter() {
        return (length + width) * 2;
    }
}
